        <%page args="edit"/>
        <table class="table table-striped pages-list">
        <thead>
        <tr>
        <th class="c1" style="width:50px;"></th>
        <th class="c1" style="width:60px;"></th>
        <th class="c1" style="width:60px;">id</th>
        <th class="c1" style="width:50px;">idx</th>
        <th class="c1" style="width:50px;">type</th>
        <th class="c1" style="width:100px;">template</th>
        <th>title</th>
        </tr>
        </thead>
        <tbody>

        %for k,v in sorted(pages.items(),key=lambda x:int(x[1].get('IDX'))):

            %if v.get('PARENT') == "":
                <tr>
                <td>
                    %if ( scfg.get('PAGEMAKE') == 'CMS' or edit != 'pages' ) and v.get('TEMPLATE') != 'NG':
                    <a href="/paneo/${edit}/edit/${k}/" class="btn">編集</a>
                    %endif
                </td>
                <td>
                ${ VIEWED.get(str(v.get('VIEWED'))) }
                </td>
                <td>${k}</td>
                <td>${v.get('IDX')}</td>
                <td>
                ${v.get('TYPE')}
                %if v.get('PARENT') != '':
                (${v.get('PARENT')})
                %endif
                </td>
                <td>
                %if scfg.get('PAGEMAKE') == 'CMS':
                ${v.get('TEMPLATE')}
                %else:
                <span class="label ${'label-info' if v.get('TEMPLATE') == 'OK' else 'label-warning'}">
                ${v.get('TEMPLATE')}
                </span>
                %endif
                </td>
                <td>
                %if scfg.get('PAGEMAKE') == 'CMS':
                <a href="/${k}.html" target="_blank" class="icon-share-alt"></a>
                %else:
                %if v.get('TEMPLATE') == 'OK':
                <a href="/${k}.html" target="_blank" class="icon-share-alt"></a>
                %endif
                %endif
                ${v.get('TITLE')}
                </td>
                </tr>
            %endif

                %for kk,vv in sorted(pages.items(),key=lambda x:int(x[1].get('IDX'))):
                %if vv.get('PARENT') == k :
                <tr>
                <td>
                    %if ( scfg.get('PAGEMAKE') == 'CMS' or edit != 'pages' ) and v.get('TEMPLATE') != 'NG':
                    <a href="/paneo/${edit}/edit/${kk}/" class="btn">編集</a>
                    %endif
                </td>
                <td>
                ${ VIEWED.get(str(v.get('VIEWED'))) }
                </td>
                <td>- ${kk}</td>
                <td>${vv.get('IDX')}</td>
                <td>
                ${vv.get('TYPE')}
                %if vv.get('PARENT') != '':
                (${vv.get('PARENT')})
                %endif
                </td>
                <td>
                %if scfg.get('PAGEMAKE') == 'CMS':
                ${vv.get('TEMPLATE')}
                %else:
                <span class="label ${'label-info' if vv.get('TEMPLATE') == 'OK' else 'label-warning'}">
                ${vv.get('TEMPLATE')}
                </span>
                %endif
                </td>
                <td>
                %if scfg.get('PAGEMAKE') == 'CMS':
                <a href="/${kk}.html" target="_blank" class="icon-share-alt"></a>
                %else:
                %if v.get('TEMPLATE') == 'OK':
                <a href="/${kk}.html" target="_blank" class="icon-share-alt"></a>
                %endif
                %endif
                ${vv.get('TITLE')}
                </td>
                </tr>
                %endif
                %endfor

        %endfor
        </tbody>
        </table>

